package com.zsh.web.controller;/**
 * @Author: 003089
 * @Description:
 * @Date: 2019/5/31 16:56
 */

import com.zsh.web.utils.FileVerifyUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;

/**
 * @Author: 003089
 * @Description:
 * @Date: 2019/5/31 16:56
 */
@Controller
@RequestMapping("/upload")
public class FileController {

    @RequestMapping(value = "/filesUpload")
    @ResponseBody
    public boolean fileUpload(@RequestParam("files") MultipartFile file) {
        return FileVerifyUtils.verifyImage(file);
    }


    @RequestMapping(value = "/jsp")
    public String testJsp() {

        return "hello";
    }
}
